class StockLogging < ActiveRecord::Base
	belongs_to :stock_logging_category
	belongs_to :inventory
	has_and_belongs_to_many :drugs
	has_one :invoice_detail, dependent: :destroy 
	
	validates :drug_id, :quantity, :inventory_id, :stock_logging_category_id, presence: true
	validates :quantity, numericality: { greater_than: 0.0 }
end
